package com.zb.vo;

import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2023/8/10 0010
 **/
@Data
@ApiModel("用户联系人对象")
public class UserContactVo {
    @ApiModelProperty(value = "联系人ID, 新增不必传，修改必传")
    private Long id;

    @NotNull(message = "主要联系人选项不能为空")
    @ApiModelProperty(value = "是否为主要联系人：false-否，true-是", required = true, example = "false")
    private Boolean mainContact;

    @NotBlank(message = "用户名称不能为空")
    @Length(max = 100, message = "用户名称限制100个字符以内")
    @ApiModelProperty(value = "用户名称", required = true)
    private String username;

    @NotBlank(message = "用户手机号不能为空")
    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "用户手机号格式不正确！")
    @ApiModelProperty(value = "用户手机号", required = true)
    private String phone;

    @Length(max = 200, message = "邮箱限制200个字符以内")
    @ApiModelProperty(value = "邮箱")
    private String email;

    @NotBlank(message = "地址-省不能为空")
    @Length(max = 50, message = "地址-省限制50个字符以内")
    @ApiModelProperty(value = "地址-省")
    private String province;

    @NotBlank(message = "地址-市不能为空")
    @Length(max = 50, message = "地址-市限制50个字符以内")
    @ApiModelProperty(value = "地址-市")
    private String city;

    @NotBlank(message = "地址-县/区不能为空")
    @Length(max = 50, message = "地址-县/区限制50个字符以内")
    @ApiModelProperty(value = "地址-县/区")
    private String area;

    @Length(max = 50, message = "地址-镇限制50个字符以内")
    @ApiModelProperty(value = "地址-镇")
    private String town;

    @NotBlank(message = "地址-详细地址不能为空")
    @Length(max = 200, message = "地址-详细地址限制200个字符以内")
    @ApiModelProperty(value = "地址-详细地址")
    private String address;
}
